package process_demo.state;

/**
 * @author haomin
 * @date 2022/04/24 21:50
 **/

import java.util.concurrent.TimeUnit;

public class Main {
    static class MyThread extends Thread {
        @Override
        public void run() {
            try {
                TimeUnit.DAYS.sleep(1);     // TIMED_WAITING
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) throws InterruptedException {
        MyThread t = new MyThread();
        t.start();


//        t.join();       // WAITING
        t.join(1000 * 60);  // 一分钟    TIMED_WAITING
    }
}
